import React, {Component} from 'react';
import {StyleSheet, Text, View, Image, ScrollView, Dimensions, ImageBackground} from 'react-native';
import {Button, WhiteSpace, WingBlank, Flex, List, Alert} from '@ant-design/react-native';
import GetMoneyInfo from '~/pages/developer/info/community/GetMoneyInfo';
const width = Dimensions.get('window').width;
class ParkGetMoney extends Component {
    static navigationOptions = {
        title: '返现金',
    };

    constructor(props) {
        //调用基类的所有的初始化方法
        super(props);

        // 设置当前组件的属性
        this.state = {
            coinvalue: this.props.navigation.getParam('coinvalue'),
        };
        console.disableYellowBox = true;
    }

    render() {
        return (
            <ScrollView style={{flex: 1}}>
                <Flex justify={'center'} direction={'column'} style={{backgroundColor: 'white', width: '100%', borderRadius: 5}}>
                    <ImageBackground style={{width: '100%', aspectRatio: 1 / 0.31}} source={require('~/assets/public/moneytu.png')}>
                        <Flex justify={'between'} style={{width: '100%', height: '100%', paddingLeft: 30, paddingRight: 30}}>
                            <Flex align={'end'}>
                                <Text style={{fontSize: 12, color: '#ec4f46'}}>￥</Text>
                                <Text style={{fontSize: 26, color: '#ec4f46', fontWeight: 'bold'}}>{this.state.coinvalue}</Text>
                            </Flex>
                            <Text style={{fontWeight: 'bold'}}>银仿超市专用现金券</Text>
                        </Flex>
                    </ImageBackground>
                    <Flex style={{width: '100%', paddingLeft: 15, paddingRight: 15, paddingBottom: 10}}>
                        <Text style={{fontsize: 10, color: 'gray'}}>
                            备注：参与活动获得的现金券将会充值到您的<Text style={{color: '#ec4f46', fontsize: 10}}>【银仿超市】</Text>
                            账户，到账后即可正常使用，该券只能用于抵扣现金消费，不能提现
                        </Text>
                    </Flex>
                </Flex>
                <GetMoneyInfo />
            </ScrollView>
        );
    }
}
const styles = StyleSheet.create({
    images: {
        width: '100%',
        height: 200,
    },
});
export default ParkGetMoney;
